using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using CentralOffice.Admin.Data;
using System.Collections.Generic;
using Husb.DataUtil;

namespace CentralOffice.WebClient
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                //CentralOffice.Admin.Data.DataSet1TableAdapters.EmployeesTableAdapter adapter = new CentralOffice.Admin.Data.DataSet1TableAdapters.EmployeesTableAdapter();
                //CentralOffice.Admin.Data.DataSet1.EmployeesDataTable table = adapter.GetData();

                //CentralOffice.Admin.Data.DataSet1.EmployeesRow emp = table.Rows[3] as CentralOffice.Admin.Data.DataSet1.EmployeesRow;
                //TextBox1.Text = emp.Name;
                //throw (new ArgumentNullException());

                Response.Write("({'job':'abc'})");
                Response.End();

            }

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            //CentralOffice.Admin.Data.DataSet1TableAdapters.EmployeesTableAdapter adapter = new CentralOffice.Admin.Data.DataSet1TableAdapters.EmployeesTableAdapter();
            //CentralOffice.Admin.Data.DataSet1.EmployeesDataTable table = adapter.GetData();

            //CentralOffice.Admin.Data.DataSet1.EmployeesRow emp = table.Rows[3] as CentralOffice.Admin.Data.DataSet1.EmployeesRow;
            //emp.Name = TextBox1.Text;
            //adapter.Update(table);

            DataSet ds = DataAccessUtil.GetDataSet(@"SELECT     Id, Name, MenuCode, RelativeURL, ImageURL, Category, IsDeleted, IsActive, CreatedTime, CreatedBy, ModifiedTime, LastModifiedBy, Version, 
                      Description, ParentId, SequenceNumber, AuthorizedRoles, ParentMenuName
FROM         Admin.View_Menus");

            int i = DataAccessUtil.ExecuteSqlString(@"UPDATE Admin.Menus SET IsDeleted = 0 WHERE Id = 'c8d04cd9-82e9-4a85-87f9-0df4459a1d3b'");

            string[] allKeys = Request.Form.AllKeys;
            string[] s = Request.Form.GetValues(1);

            List<string> values = new List<string>();
            foreach (string val in Request.Form.AllKeys)
            {
                if (val.StartsWith("Text"))
                {
                    values.Add(Request.Form.Get(val));
                }
            }
        }

        private void button1_Click(object sender, System.EventArgs e)
        {
            
        }

        
    }
}
